<extend name="Public/base"/>

<block name="body">
	<div class="main-title">
		<h2>{$type_name} － {$attribute_name} － 属性值列表</h2>
	</div>
    <div class="cf">
        <a class="btn" href="{:U('goodsAttributeValueAdd?id='.$pid)}">新 增</a>
        <button class="btn ajax-post" target-form="ids" url="{:U('updateGoodsAttributeStatus',array('status'=>1))}">启 用</button>
        <button class="btn ajax-post" target-form="ids" url="{:U('updateGoodsAttributeStatus',array('status'=>0))}">禁 用</button>
        <button class="btn ajax-post confirm" url="{:U('updateGoodsAttributeStatus',array('status'=>-1))}" target-form="ids">删 除</button>
        <a class="btn" href="{:U('goodsAttributeList?id='.$go)}">返 回</a>
    </div>

    <div class="data-table table-striped">
        <form class="ids">
            <table>
                <thead>
                    <tr>
                        <th class="row-selected">
                            <input class="checkbox check-all" type="checkbox">
                        </th>
                        <th>ID</th>
                        <th>属性值</th>
                        <th>排序</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
		<notempty name="list">
                <volist name="list" id="vo">
                    <tr>
                        <td><input class="ids row-selected" type="checkbox" name="ids[]" value="{$vo.id}"></td>
                        <td>{$vo.id}</td>
                        <td>{$vo.name|default='无'}</td>
                        <td>{$vo.sort}</td>
                        <td>
                            <a href="{:U('updateGoodsAttributeStatus?ids='.$vo['id'].'&status='.abs(1-$vo['status']))}" class="ajax-get">{$vo.status|show_status_op}</a>
                            <a title="编辑" href="{:U('goodsAttributeValueEdit?id='.$vo['id'])}">编辑</a>
                            <a class="confirm ajax-get" title="删除" href="{:U('updateGoodsAttributeStatus?ids='.$vo['id'].'&status=-1')}">删除</a>
                        </td>
                    </tr>
                </volist>
                <else/>
                <td colspan="10" class="text-center"> aOh! 暂时还没有内容! </td>
		</notempty>
                </tbody>
            </table>
        </form>
        <!-- 分页 -->
        <div class="page">
            {$_page}
        </div>
    </div>
</block>

<block name="script">
    <script type="text/javascript">
       highlight_subnav('{:U('goodsTypeList')}');
    </script>
</block>